package com.xh.clean.modular.clean.warpper;

import com.xh.clean.core.base.warpper.BaseControllerWarpper;
import com.xh.clean.core.common.constant.factory.ConstantFactory;

import java.util.List;
import java.util.Map;

/**
 * 楼层包装类
 *
 * @author 杨杰
 * @create 2018-06-24 10:58
 **/
public class StoreyWarpper extends BaseControllerWarpper {
    public StoreyWarpper(List<Map<String, Object>> list) {
        super(list);
    }

    @Override
    protected void warpTheMap(Map<String, Object> map) {
        Integer creater = (Integer) map.get("creater");
        map.put("createrName", ConstantFactory.me().getUserNameById(creater));
        Object parea_types = map.get("pareaTypes");
        if (parea_types != null) {
            String types=  (String)parea_types;
            map.put("typeNames", ConstantFactory.me().getDictNamesByInId(types));
        }
    }
}
